﻿
@model PagedList.IPagedList <DoAnBLL.sanpham>
@{
    ViewBag.Title = "Tim Kiem";
 }

			
@using (Html.BeginForm())
{
    <div class="editor-label">
    <p>
        Kiếm theo tên: @Html.TextBox("searhstring", ViewBag.CurrentFilter as string)
        <br />
        Tên nhà cung cấp: @Html.DropDownList("ncc", String.Empty)
        <br />
        Loại sản phẩm : @Html.DropDownList("loaisp", String.Empty)<br />
        <input type="submit" value="Go" />
    </p>
        </div>
}
@Html.Partial("_SanPhamPartial")

<div class="editor-label">
    Page @(Model.PageCount < Model.PageNumber ? 0 : Model.PageNumber) of @Model.PageCount
    @if (Model.HasPreviousPage)
    {
        @Html.ActionLink("<<", "TimKiem", new { page = 1, sortOrder = ViewBag.CurrentSort, currentFilter=ViewBag.CurrentFilter, Versions = ViewBag.SelectedVersion   })
        @Html.Raw(" ");
        @Html.ActionLink("< Prev", "TimKiem", new { page = Model.PageNumber - 1, sortOrder = ViewBag.CurrentSort, currentFilter = ViewBag.CurrentFilter, Versions = ViewBag.SelectedVersion })
    }
    else
    {
        @:<<
        @Html.Raw(" ");
        @:< Prev
    }

    @if (Model.HasNextPage)
    {
        @Html.ActionLink("Next >", "TimKiem", new { page = Model.PageNumber + 1, sortOrder = ViewBag.CurrentSort, currentFilter=ViewBag.CurrentFilter, Versions = ViewBag.SelectedVersion  })
        @Html.Raw(" ");
        @Html.ActionLink(">>", "TimKiem", new { page = Model.PageCount, sortOrder = ViewBag.CurrentSort, currentFilter = ViewBag.CurrentFilter, Versions = ViewBag.SelectedVersion })
    }
    else
    {
        @:Next >
        @Html.Raw(" ")
        @:>>
    }
</div>





